#include <iostream>
using namespace std;

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <string>
#include <cstring>

int main()
{
    const char * filename = "./demoAppend.cpp";
    
    struct stat fileInfo;

    stat(filename,&fileInfo);

    cout<<"size:"<<fileInfo.st_size<<endl;

    if(S_ISREG(fileInfo.st_mode))
    {
        cout<<"regular file"<<endl;
    }
    

    return 0;
}